package com.sphd.emanu.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.emanu.R;
import com.sphd.emanu.pojo.order.Order;
import com.wzutils.TimeUtils;

import java.util.List;

/**
 * @Author Hu
 * @Time 2017/4/24 --16:21.
 * @Email 87683202@qq.com
 */
public class SaleorderAdapter extends BaseQuickAdapter<Order,BaseViewHolder>{
    public SaleorderAdapter(int layoutResId, List<Order> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Order item) {
        helper
                .setText(R.id.item_order_no,"订单编号"+item.getCode())
                .setText(R.id.item_order_money,"￥"+item.getAmount().toString())
                .setText(R.id.item_order_time, TimeUtils.dateToString(item.getFinishTime(),TimeUtils.YEAR_MONTH_DAY_HOUR_MIN_SS));
    }
}
